<include file="public@storage"/>
<style>
    form {
        margin-top: 100px;
        padding-left: 50px;
        padding-right: 50px;
    }

</style>
</head>
<body>
<div>
    <form class="form-horizontal table" id="form" action="{:url('storage/ClientPda/addVersion')}" method="post">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title">客户端版本信息</h3>
            </div>
            <div class="panel-body">
                <div class="form-group">

                    <label class="col-md-2 control-label" for="url">下载链接：</label>
                    <div class="col-md-2">
                        <input type="text" name="urlId" id="urlId" class="form-control" disabled="disabled"  required="required" placeholder="请先上传文件" value="{$Url}">
                        <button type="button" class="mui-btn mui-btn--raised mui-btn--primary" onclick=location="{:url('storage/ClientPda/addFile')}">文件上传</button>
                        <span id="urlError" style="color: red"></span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label" for="name">版本名称：</label>
                    <div class="col-md-2">
                        <input type="hidden" name="url" id="url" class="form-control"   placeholder="必填项" required="required"  value="{$Url}">
                        <input type="text" name="name" id="name" class="form-control" placeholder="必填项" required="required">
                        <span id="nameError" style="color: red"></span>
                    </div>

                    <label class="col-md-2 control-label" for="major_version">主版本号：</label>
                    <div class="col-md-2">
                        <input type="text" name="major_version" id="major_version" class="form-control" placeholder="请填写数字" required="required"
                               onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onblur="this.v();">
                        <span id="major_versionError" style="color: red"></span>
                    </div>

                    <label class="col-md-2 control-label" for="minor_version">次版本号：</label>
                    <div class="col-md-2">
                        <input type="text" name="minor_version" id="minor_version" class="form-control" placeholder="请填写数字" required="required"
                               onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onblur="this.v();">
                        <span id="minor_versionError" style="color: red"></span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label" for="description">版本描述：</label>
                    <div class="col-md-2">
                        <input type="select" name="description" id="description" class="form-control">
                        <span id="descriptionError" style="color: red"></span>
                    </div>

                    <label class="col-md-2 control-label" for="updateType">是否强制更新：</label>
                    <div class="col-md-2">
                        <select name="update_type" id="updateType" class="form-control" >
                            <option value="0" selected>不强制更新</option>
                            <option value="1">强制更新</option>
                        </select>
                        <span id="updateTypeError" style="color: red"></span>
                    </div>
                </div>



                <div class="form-group text-center">
                    <button type="submit" class="mui-btn mui-btn--raised mui-btn--primary" id="submit" >添加</button>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <button type="button" class="mui-btn mui-btn--raised mui-btn--primary" onclick=location="{:url('storage/ClientPda/index')}">取消</button>
                </div>
            </div>
        </div>
    </form>
</div>
</body>
</html>